package com.peas.platform.module.icims.base.auth.controller.vo;

import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.common.core.vo.BaseVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel("用户")
public class UserVo extends BaseVo {

    @Comment(value = "用户名")
    @ApiModelProperty(value = "用户名")
    @NotBlank(message = "用户名不能为空")
    @Size(max = 30, message = "用户名不能超过30个字符")
    private String username;

    @Comment(value = "密码")
    @ApiModelProperty(value = "密码")
    @NotBlank(message = "密码不能为空")
    @Size(max = 100, message = "密码不能超过100个字符")
    private String password;

    @Comment(value = "状态", enumType = "UserState")
    @ApiModelProperty(value = "状态", notes = "枚举取值:UserState")
    @NotBlank(message = "状态不能为空")
    @Size(max = 20, message = "状态不能超过20个字符")
    private String state;

    @Comment(value = "是否管理员", enumType = "CommonYesNo")
    @ApiModelProperty(value = "是否管理员", notes = "枚举取值:CommonYesNo")
    @Size(max = 20, message = "是否管理员不能超过20个字符")
    private String isManager;

    @Comment(value = "是否强制修改密码", enumType = "CommonYesNo")
    @ApiModelProperty(value = "是否强制修改密码", notes = "枚举取值:CommonYesNo")
    @Size(max = 20, message = "是否强制修改密码不能超过20个字符")
    private String needModify;

    @Comment(value = "最后一次登录时间")
    @ApiModelProperty(value = "最后一次登录时间")
    private Date lastLoginTime;

    @Comment(value = "最后一次登录IP")
    @ApiModelProperty(value = "最后一次登录IP")
    @Size(max = 15, message = "最后一次登录IP不能超过15个字符")
    private String lastLoginIp;

    @Comment(value = "姓名")
    @ApiModelProperty(value = "姓名")
    @Size(max = 20, message = "姓名不能超过20个字符")
    private String name;

    @Comment(value = "性别", enumType = "UserGender")
    @ApiModelProperty(value = "性别", notes = "枚举取值:UserGender")
    @Size(max = 20, message = "性别不能超过20个字符")
    private String gender;

    @Comment(value = "手机号码")
    @ApiModelProperty(value = "手机号码")
    @Size(max = 15, message = "手机号码不能超过15个字符")
    private String mobile;

    @Comment(value = "身份证号")
    @ApiModelProperty(value = "身份证号")
    @Size(max = 18, message = "身份证号不能超过18个字符")
    private String idcard;

    @Comment(value = "邮箱")
    @ApiModelProperty(value = "邮箱")
    @Size(max = 50, message = "邮箱不能超过50个字符")
    private String email;

    @Comment(value = "头像")
    @ApiModelProperty(value = "头像")
    private Long avatar;

    // （组织架构表）外键
    @Comment(value = "组织架构ID")
    @ApiModelProperty(value = "组织架构ID")
    private Long organizationId;

    @Comment(value = "职级", dictType = "UserRank")
    @ApiModelProperty(value = "职级", notes = "字典取值:UserRank")
    @Size(max = 20, message = "职级不能超过20个字符")
    private String rank;

    @Comment(value = "签名图")
    @ApiModelProperty(value = "签名图")
    private Long sign;

}
